package pt.ipleiria.estg.dei.ei.es2.bio;

import android.test.ActivityInstrumentationTestCase2;

import com.robotium.solo.Solo;

/**
 * Created by dt3ft on 05/03/15.
 */
public class MainActivityTest extends ActivityInstrumentationTestCase2<MainActivity> {

    private Solo solo;

    public MainActivityTest(){
        super(MainActivity.class);
    }

    @Override
    public void setUp() throws Exception{
        solo = new Solo(getInstrumentation() , getActivity());
    }

    @Override
    public void tearDown() throws Exception{
        solo.finishOpenedActivities();
    }

    public void testName() throws Exception {
        solo.unlockScreen();

        solo.clickOnActionBarItem(R.id.action_checkin);

        boolean result = solo.searchText(getActivity().getString(R.string.titleConfirmation));

        assertTrue("Nao encontrei a mensagem de confirmação",result);
    }
}
